package org.example.functionInterface;

import java.util.function.Function;

public class Demo09Function {
    public static void main(String[] args) {
        String s = "123";
//lambda标准格式       
        fun(s, (String str) -> {
            return Integer.parseInt(str);
        }, (Integer num) -> {
            return num * 10;
        });
    }

    /*        定义一个方法,有两个Function接口作为参数     */
    public static void fun(String s, Function<String, Integer> fun1, Function<Integer, Integer> fun2) {
        Integer num3 = fun1.andThen(fun2).apply(s);
        System.out.println(num3);
    }
}